<?php
/**
 * Created by PhpStorm.
 * User: xiazc01
 * Date: 2018/6/13
 * Time: 14:06
 */

namespace common\entities\myhtsq;

use common\entities\CommonEntity;

/**
 * This is the model class for table "income_item_log".
 *
 * @property string $platform
 * @property string $operator_name
 * @property string $business_type
 * @property string $contract_guid
 * @property string $operated_on
 * @property string $operator_guid
 * @property string $model_diff
 * @property string $explain_diff
 * @property string $success
 * @property string $operate
 * @property string $explain
 * @property string $revenue_id
 */


class IncomeItemLogEntity extends CommonEntity
{

    /**
     * @return string
     */
    public static function tableName() {
        return 'income_item_log';
    }

    public function rules() {
        return [
            ['platform', 'required'],
            ['operator_name', 'string', 'max' => 50],
            ['business_type', 'string', 'max' => 128],
            [['model_diff','explain_diff'],'string','max'=> 8000],
            ['operated_on', 'safe'],
            [['contract_guid', 'operated_on', 'operator_guid','revenue_id'], 'string', 'max' => 36],
            ['success','integer'],
            ['operate','string']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'platform' => '平台',
            'model_diff' => '模型差异',
            'explain_diff' => '差异说明',
            'revenue_id' => '收入项ID',
            'operated_on' => '操作时间',
            'operator_guid' => '操作人GUID',
            'operator_name' => '操作人姓名',
            'contract_guid' => '合同ID',
            'business_type' => '业务类型',
            'operate' => '操作',
            'success' => '操作结果',
        ];
    }

}
